﻿// FlmPoint
// Object representing a point in 2D/3D space
// 
// FLMScan - Featured by FabLab Munich

using System;
using log4net;

namespace FLMScan.Geometry
{
    class FlmPoint
    {
        private ILog logger;

        private double x;
        private double y;
        private double z;

        public FlmPoint()
        {
            logger = LogManager.GetLogger(typeof(FlmPoint));

            this.x = 0.0;
            this.y = 0.0;
            this.z = 0.0;
        }

        public FlmPoint(double x, double y)
        {
            logger = LogManager.GetLogger(typeof(FlmPoint));

            this.x = x;
            this.y = y;
            this.z = 0.0;
        }

        public FlmPoint(double x, double y, double z)
        {
            logger = LogManager.GetLogger(typeof(FlmPoint));

            this.x = x;
            this.y = y;
            this.z = z;
        }

        public double X
        {
            get { return x; }
            set { x = value; }
        }

        public double Y
        {
            get { return y; }
            set { y = value; }
        }

        public double Z
        {
            get { return z; }
            set { z = value; }
        }

        public void Log(String prefix)
        {
            logger.DebugFormat("{0} FlmPoint: x:{1} y:{2} z:{3}", prefix, X, Y, Z);
        }
    }
}
